/**
 * @Author YuanYuan
 * @Date 2022/5/8
 * @Time 10:33
 */
public class Date {
    private int year;
    private int month;
    private int day;

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }



    public void  setDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void printDate() {
        System.out.println(this.year+" "+this.month+" " +this.day);
    }


    public Date() {
        //this(1890,12,3);
        this.year = 1992;
        this.month = 9;
        this.day = 13;
        System.out.println("没有参数的构造函数 ： ");
    }
    public Date(int year,int month,int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("调用三个参数的构造函数： ");
    }



    public static void main2(String[] args) {
        Date date1 = new Date();
        date1.printDate();
    }
    public static void main(String[] args) {
        Date date1 = new Date();
        date1.printDate();
//        date1.year = 2020;
//        date1.month = 5;
//        date1.day = 8;
//        date1.setDate(2020,5,8);
//        date1.printDate();
//        Date date2 = new Date();
//        date2.year = 2021;
//        date2.month = 5;
//        date2.day = 8;
//        date2.setDate(2021,5,8);
//        date2.printDate();
//        Date date3 = new Date();
//        date3.year = 2022;
//        date3.month = 5;
//        date3.day = 8;
//        date3.setDate(2022,5,8);
//        date3.printDate();
//        Date date4 = new Date(2020,6,8);
//        date4.printDate();
        Date date2 = new Date(1998,5,10);
        date2.printDate();
    }
}
